<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var n = 0;
        function a(){
            var n = 10;
            function b(){
                n++ 
                console.log(n) 
            }
            b()
            return b
        }
        var c = a()// 11
        c() // 12
        console.log(n) //0
    </script>
</body>
</html>